FROM pytorch/pytorch:latest

# 安装 JupyterLab 和常用数据科学库
RUN pip install --no-cache-dir jupyterlab matplotlib pandas scikit-learn seaborn

# 创建工作目录
WORKDIR /workspace

# 创建启动脚本
COPY start-jupyter.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/start-jupyter.sh

# 暴露端口
EXPOSE 8888

# 设置启动命令
CMD ["/usr/local/bin/start-jupyter.sh"]